package com.bandit.service.impl;

import com.bandit.dao.BloggerDao;
import com.bandit.pojo.Blogger;
import com.bandit.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {
    @Autowired
    BloggerDao bloggerDao;
    //登录验证
    @Override
    public boolean loginCheck(String username, String password) {
        Blogger blogger = bloggerDao.getLoginInfo(1);
        if (username.equals(blogger.getUsername())&&password.equals(blogger.getPassword())){
            return true;
        }else {
            return false;
        }
    }
}
